home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SPACE 1
/
SPACE - Library 1 - Volume 1.iso
/
program
/
113
/
gfatip12
/
gfatip12.doc
< prev
next >
Wrap
Text File
|
1987-11-11
|
6KB
|
130 lines
November 11, 1987
GFATIP12.DOC
by John B. Holder
Senior Software Engineer
Marathon Computer Press
Asst. Sysop on GEnie's MichTron Roundtable
This is the 12th in a planned series of GFA Tip files.
The topic of this issue is creating Quick Draw Text Windows
in GFA Basic. In this archive you will find the following
files:
GFATIP12.BAS
WINDOW.BAS
GFATIP12.PRG
GFATIP12.DOC
Background
This GFATIP file is intended to show you that you can
create Fast Redraw GEM(tm) windows and how to do it. It is a
fairly complex subject, so if you are a beginner just bear
with the concepts in this doc file & refer to the source code
to gain an understanding of what is happening.
Why do this?
GEM(tm) is well known and loved for it's ease of use
with it's unique user interface, however it isn't the best
graphics text handler in the world. Obviously there are a
few software developers out there that agree with this
concept too. That's why we have seen programs like TEMPUS
emerge. This specialized type of Window Redrawing employed
by programs of this class are not relying on GEM(tm) to
accomplish the placement of Graphics Text within a window.
They are using their own video writing routines to conduct
smooth, flicker free text scrolling. After you have had a
chance to view the files in this GFATIP ARChive, you'll note
the difference in scrolling and redraw times.
What must we do?
First off we will set up a few screen buffers, and then
we can use Xbios 5 to conduct some fancy dancy frame
flipping. Please refer to the source code to discover where
and how these buffers are set up.
Why is it faster?
The presented method of window redrawing is faster
because we are writing to our offscreen video page in
straight text mode & not GEM(tm) graphics text mode. You can
realize a savings of up to 50% or more. From that point all
we have to do is Grab the appropriate screen area with GET,
flip back to the physical screen ram area and PUT the text
into our GEM(tm) window. Pretty easy huh? Now, I'll bet
you're thinking, "Why didn't I think of that?".
What can I display in the Text Window?
You can display any ASCII text file you care to load
into the window. For that matter, why not run the GFATIP12
compiled program and load in this .DOC file? By doing so,
you'll get a quick appreciation for just what is happening.
Why is the WINDOW.BAS file included?
I included that file for two reasons. First, it is the
beginning file I used for the creation of this TIP file. It
will demonstrate more of the GEM Window functions that are
possible than GFATIP12.BAS will, & it's a good comparison
program for you to see the difference made with the Quick
Draw Windows.
Closing Comments
You are provided with a running turnkey text display
windowing program + the source code so that you can begin to
create professional quality scrolling text windows in your
own programs. Since this is a fairly complex subject, you
are left to studying the source code in the provided files to
learn the techniques on your own. You may want to pick up a
good GEM(tm) reference to fully grasp the undertakings of the
program. I would recommend 2 books at this stage. They are:
ATARI ST GEM Programmer's Reference
&
ATARI ST Internals
Both of the above books are published by ABACUS software
& can be purchased either directly or through your local
software store (if any).
I'm sure that some of you will experience difficulty in
understanding the concepts presented in this TIP file.
Please be forewarned that when experimenting with variations
of this program you'll most likely crash your system, or
become totally frustrated. Since I get numerous letters &
Email notes weekly, I can't promise that I'll be able to help
you out when you've altered the provided source code. You
are best served if you purchase one or both of the above
mentioned books for explanations of what is going on in the
program. Good luck & Happy GFA Basic'ing!
PD release
This GFATIP file is in the public Domain. However, the
documentation file is Copyright (c)1987 by Marathon Computer
Press, and is provided as a public service. You may not
include the text of this file in any publication, or
newsletter without the approval of Marathon Computer Press.
The source code and idea are free for grabs. You may also
post this file on any bulletin board as long as it is posted
in it's entirety. If you use the material presented here,
please make mention of where you heard it first! No charge
(of any kind) may be assessed for providing this Tip to the
public. If it's not 100% Free, don't do it! Nuff Said.